<template>
  <div>
    <el-form ref="formtouyun" :model="formtouyun" label-width="80px">
            <el-row >
                <el-col :span="12">
                  <el-form-item label="尖">
                    <el-input v-model="formtouyun.sharpValue" size="small" style="width: 100%;" placeholder="请输入"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="峰">
                    <el-input v-model="formtouyun.peakValue" style="width: 100%;" size="small" placeholder="请输入"></el-input>
                  </el-form-item>
                </el-col>
            </el-row>
            <el-row >
                <el-col :span="12">
                  <el-form-item label="平">
                    <el-input v-model="formtouyun.flatValue" size="small" style="width: 100%;" placeholder="请输入"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="谷">
                    <el-input v-model="formtouyun.valleyValue" size="small" style="width: 100%;" placeholder="请输入"></el-input>
                  </el-form-item>
                </el-col>
            </el-row>
            <el-row >
                <el-col :span="12">
                  <el-form-item label="深谷">
                    <el-input v-model="formtouyun.deepValleyValue" placeholder="请输入" size="small" style="width: 100%;"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="总">
                    <el-input v-model="formtouyun.totalValue" size="small" style="width: 100%;" placeholder="请输入"></el-input>
                  </el-form-item>
                </el-col>
            </el-row>
            <el-row >
              <el-col :span="12">
                  <el-form-item label=" ">
                    <el-button type="primary" size="small" class="youyunbut" @click="duqu">读取示数</el-button>
                  </el-form-item>
                </el-col>
            </el-row>
          </el-form>
  </div>
</template>

<script>
import { getmetershishuapi } from '@/api/prwpaid/user-manage/OpenAaccount'
export default {
  name: 'CallPoliceShiSu',
  props: ['touyunrow'],
  data () {
    return {
      formtouyun: {
        // sharpValue:0,peakValue:0,flatValue:0,valleyValue:0,totalValue:0
      }
    }
  },

  mounted () {

  },

  methods: {
    duqu () {
      getmetershishuapi({ measuringPointId: this.touyunrow.id, meterType: this.touyunrow.energyType }).then(res => {
        this.$message({
          type: res.code == '200' ? 'success' : 'warning',
          message: res.code == '200' ? '读取成功' : res.message
        })
        if (res.code == '200') {
          this.formtouyun = { ...res.data.entity }
        }
      })
    },
    dushu (val) {
      this.formtouyun = { ...val }
      console.log(this.formtouyun,666);
      
    }
  }
}
</script>

<style scoped>
::v-deep .el-form-item{
  margin-bottom: 0 !important;
}
</style>